The invention relates to a process for preparing malonic diesters by carbonylation of haloacetic esters, in particular alkyl chloroacetates, with carbon monoxide and reaction with monohydric alcohols and bases in the presence of transition metal catalysts using a reactor with one or more internal heat exchanger(s).
It is known that malonic diesters of the formula I 
where R1 and R2 are each, independently of one another, an unbranched or branched alkyl or alkenyl group, a cycloalkyl group or an aralkyl group having from 1 to 30 carbon atoms, preferably an alkyl group having from 1 to 6 carbon atoms, can be prepared by carbonylation of haloacetic esters of the formula II 
where R1 is as defined above and Hal is a halogen atom, with carbon monoxide and reaction with a monohydric alcohol of the formula R2OH, where R2 is as defined above and preferably corresponds to the radical R1 in formula II, using a base in the presence of a transition metal catalyst.
In the carbonylation of compounds of the formula II and reaction with monohydric alcohols, considerable heat of reaction is liberated. On an industrial scale, the reaction is therefore customarily carried out in a loop reactor such as a BUSS reactor (DE-A 25 53 931).
The yields of compounds of the formula I achieved are usually above 90% of theory, based on the amount of haloacetic ester used, even when the reaction is carried out on an industrial scale. With a view to minimizing the production costs, it is therefore particularly important to optimize the space-time yields. In principle, these can be improved by increasing the reaction temperature and increasing the starting material concentrations.
An increase in the reaction temperature is desirable not only because of the associated increase in the reaction rate, but also, in view of the highly exothermic nature of the reaction, because of the greater temperature difference between reaction medium and cooling medium.
However, an increase in the reaction temperature is subject to limits for a number of reasons. Thus, reaction temperatures significantly above 100xc2x0 C. are not possible because the catalyst is then generally no longer stable even in the presence of high carbon monoxide partial pressures.
It is also known that the yield of malonic diesters, based on the amount of haloacetic esters reacted, drops with increasing reaction temperature. Thus, the isolated yields of the particularly important dimethyl malonate are from 2 to 3 percent lower when the reaction is carried out at 90xc2x0 C. instead of at 50-70xc2x0 C. under otherwise unchanged conditions. Conversely, reaction temperatures significantly below 90xc2x0 C. are not acceptable on an industrial scale because of the considerable increases in the reaction times associated therewith (JP 57-183 741).
An increase in the starting material concentration is likewise subject to restrictions. Thus, the halides formed during the reaction are generally obtained as solid salts. The bases used are also frequently crystalline solids under the reaction conditions (for example sodium carbonate). The formation of salt leads, particularly together with the water formed during the reaction, at comparatively high starting material concentrations of, for example, 25% solids in the reaction mixture to this mixture no longer being able to be fully uniformly mixed when carrying out the reaction in a stirred reactor or a loop reactor or BUSS reactor. It has also been found that an increase in the content of, for example, alkyl chloroacetate and/or dialkyl malonate in the reaction mixture to over 3.75 mol/l of reaction volume is associated with a reduction in selectivity in conventional reactors.
Although it is possible to improve the selectivity of the carbonylation reaction by means of additives to the reaction mixture (JP 54 112 818), this can make the work-up of the reaction products more difficult. Contamination caused by additives is also a considerable disadvantage in respect of further utilization of the solvent(s), of the catalyst or of its downstream products and especially of the salt formed.
It is therefore an object of the invention to find a process for preparing malonic diesters of the formula I by carbonylation of haloacetic esters of the formula II with carbon monoxide and reaction with monohydric alcohols which does not have the abovementioned disadvantages and which gives improved space-time yields at simultaneously unimpaired or improved product selectivity.
It has now surprisingly been found that very high space-time yields can be achieved if the carbonylation reaction and reaction with the monohydric alcohol is carried out in a stirred reactor provided with one or more internal heat exchanger(s).
The invention accordingly provides a process for preparing malonic diesters of the formula I, 
where R1 and R2 are each, independently of one another, an unbranched or branched alkyl or alkenyl group, a cycloalkyl group or an aralkyl group having from 1 to 30 carbon atoms, by carbonylation of haloacetic esters of the formula II, 
where R1 is as defined above and Hal is a halogen atom, using carbon monoxide, a monohydric alcohol of the formula R2OH, where R2 is as defined above, a base and a transition metal catalyst, wherein the reaction is carried out in a stirred reactor with one or more internal heat exchanger(s).
In this way, for example, it was possible to use up to 5.2 mol of methyl chloroacetate per liter of liquid phase of the reaction mixture in the preparation of the industrially particularly important dimethyl malonate without mixing problems occurring. In addition, the yields of isolated target product (assay:  greater than 99.7%) achieved in this way were, for example, 92.0% and thus comparable with those obtained under analogous conditions but in greater dilution in the BUSS reactor (91.5%) or a stirred reactor (91.3%).
The components can be combined at ambient temperatures (room temperature). The reaction temperatures are from 40 to 100xc2x0 C., preferably from 50 to 95xc2x0 C. However, regardless of the type of reactor used, it has been found to be advantageous in terms of high space-time yields to approach desirable high reaction temperatures of, for example, 90xc2x0 C. continuously via a defined temperature ramp. It has been found to be particularly advantageous to heat the reaction mixture initially to the temperature required for starting the reaction, for example 50xc2x0 C., before then increasing the temperature stepwise or preferably continuously to, for example, 90xc2x0 C. If desired, an afterreaction phase can follow at the same temperature level or a lower temperature level.
To enable good mixing of the carbon monoxide with the suspension comprising the remaining components of the reaction mixture in the case of the stirred reactor and the stirred reactor with one or more internal heat exchanger(s), the use of a sparging stirrer is advantageous. In this way, satisfactory dispersion of the carbon monoxide in the reaction mixture can be achieved even on an industrial scale without external pumps or compressors having to be used.
Surprisingly, it has also been found that deposits of the halide formed during the reaction can be largely avoided if a stirred reactor provided with sparging stirrer and internal heat exchangers as described in EP-A-0 633 060, hereinafter also referred to as a xe2x80x9cBIAZZIxe2x80x9d reactor, is employed.
With regard to the excellent mixing of the carbon monoxide with the other components of the reaction mixture in a loop reactor or xe2x80x9cBUSSxe2x80x9d reactor, it has also surprisingly been found when using a xe2x80x9cBIAZZIxe2x80x9d reactor for the carbonylation of the haloacetic esters and reaction with the monohydric alcohol that the catalyst is subject to a significantly lower decomposition rate at the same carbon monoxide partial pressure and the same temperature. This enables higher reaction temperatures to be achieved and/or a lower than usual amount of transition metal catalyst to be used, as a result of which the costs of recirculating the latter to the process are lower.
The halogen in the haloacetic ester is chlorine, bromine or iodine. Preference is given to using chloroacetic esters.
As transition metal catalysts, it is possible to use transition metal complexes or transition metal complex salts containing transition metals selected from the group consisting of cobalt, ruthenium, palladium and platinum. Cobalt is preferred as transition metal. As catalytic cobalt carbonyl complex, preference is given to using dicobalt octacarbonyl and species which can be generated therefrom, for example alkali metal salts, in particular sodium salts, of hydridocobalt carbonyl. As bases, it is possible to use, in particular, alkali metal and alkaline earth metal hydroxides, carbonates and hydrogencarbonates. The sodium compounds, in particular sodium carbonate, are preferred.
It has likewise surprisingly been round that the isolated yields of malonic diesters or the formula I and thus the selectivities achieved increase regardless of the type of reactor used if the reaction mixture comprises not only the haloacetic ester of the formula II, the monohydric alcohol of the formula R2OH, the carbon monoxide, the base and the transition metal catalyst but also from 0.1 to 60% by weight, preferably from 5 to 40% by weight, particularly preferably from 10 to 30% by weight, in each case based on the total reaction mixture, of a nonpolar solvent which is inert under the reaction conditions (cosolvent). Toluene has been found to be a particularly advantageous cosolvent.
An increasing addition of toluene initially results in increasing isolated yields of the compounds of the formula I. However, one finally reaches a point of maximum selectivity above which the isolated yields of the compounds of the formula I drop sharply.
The Theological behavior of the reaction mixture displays similar trends to the isolated yields. While small additions of toluene have, as expected, a small influence on the rheology of the reaction mixture, additions of  greater than 60% of toluene, based on the total reaction mixture, when carrying out the reaction in a stirred reactor or in a loop reactor or a BUSS reactor lead to formation of the salt of reaction in an increasingly greasy, difficult-to-handle and difficult-to-mix form. Furthermore, deposits of the salt of reaction which can only be partly removed by rinsing with the alcohol or alcohol/cosolvent mixture used are formed.
Surprisingly, greater amounts of cosolvent can be present in the reaction mixture without the abovementioned problems occurring when the reaction is carried out in the xe2x80x9cBIAZZIxe2x80x9d reactor. These higher cosolvent contents are in turn surprisingly accompanied by higher isolated yields of the malonic diesters of the formula I and thus higher selectivities. Thus, higher isolated yields of, for example, up to 94.3% of theory of dimethyl malonate (assay:  greater than 99.8%) can be achieved when the carbonylation reactions and reactions with the monohydric alcohol are carried out in the xe2x80x9cBIAZZIxe2x80x9d reactor with addition of cosolvent, in particular toluene, despite increased starting material concentrations and the associated increase in the space-time yields.
After the reaction is complete, the catalyst is preferably decomposed by means of oxygen or an oxygen-containing gas.
A fundamental advantage of a stirred reactor, whether without or with one or more internal heat exchangers, compared to a loop reactor or xe2x80x9cBUSSxe2x80x9d reactor is the opportunity of depressurizing the gas phase in the reactor more rapidly. The amounts of carbon dioxide formed during the reaction which are dissolved in the reaction mixture cause strong foaming in the case of rapid depressurization, and this leads at small gas-liquid interfacial areas to entrainment of liquid and solid components of the reaction mixture.
Together with the above-described results on increasing the space-time yield of the process, significantly shortened cycle times are therefore obtained in the case of batchwise operation of the reactor, or higher throughputs in the case of continuous reactor operation are possible compared to the simple stirred reactor and the loop or xe2x80x9cBUSSxe2x80x9d reactor. According to the invention, the time for filling and emptying the xe2x80x9cBIAZZIxe2x80x9d reactor, for heating the reaction mixture to the commencement of carbon monoxide absorption and for the actual carbonylation reaction and reaction with the monohydric alcohol can thus be reduced to cycle times of significantly less than 120 minutes, preferably not more than 90 minutes.
Malonic diesters are versatile synthetic building blocks in organic chemistry, For example as intermediates in the synthesis of pharmaceuticals, plastics, crop protection agents, fragrances, flavors and dyes.